﻿using System.ComponentModel;
using System.Windows.Controls;
using ChatClient.Services;
using ChatClient.ViewModels;
using DotnetUtil.Services;

namespace ChatClient.Views
{
    /// <summary>
    /// ChatView.xaml 的交互逻辑
    /// </summary>
    // ReSharper disable once RedundantExtendsListEntry
    public partial class ChatView : UserControl
    {
        public ChatView(
            ILogService logService,
            IChatService chatService,
            IDialogService dialogService,
            ISessionService sessionService
        )
        {
            InitializeComponent();

            if (!DesignerProperties.GetIsInDesignMode(this))
            {
                DataContext = new ChatViewModel(
                    logService,
                    chatService,
                    dialogService,
                    sessionService
                );
            }
        }
    }
}
